package com.engine.salary.entity.salarysob.dto;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 薪资账套的薪资项目
 * <p>Copyright: Copyright (c) 2022</p>
 * <p>Company: 泛微软件</p>
 *
 * @author qiantao
 * @version 1.0
 **/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
//薪资账套的薪资项目
public class SalarySobItemDTO {

    //主键id
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    //薪资账套的id
    @JsonSerialize(using = ToStringSerializer.class)
    private Long salarySobId;

    //薪资项目的id
    @JsonSerialize(using = ToStringSerializer.class)
    private Long salaryItemId;

    //薪资项目分组的id
    @JsonSerialize(using = ToStringSerializer.class)
    private Long salaryItemGroupId;

    //名称
    private String name;


    //是否是薪资档案引用
    private Integer useInEmployeeSalary;

    //是否是系统内置的薪资项目 @see SalarySystemTypeEnum
    private Integer systemType;

    //默认使用
    private Integer useDefault;

    //属性 @see SalaryItemCategoryEnum
    private Integer category;

    //类型（展示名称）
    private String itemType;

    //类型 @see SalaryItemTypeEnum
    private Integer itemTypeId;

    //取值方式 @see SalaryValueTypeEnum
    private Integer valueType;

    private String dataType;

    //数据来源（展示名称）
    private String dataSource;

    //数据来源 @see SalaryDataSourceEnum
    private Integer dataSourceId;

    //公式
    @JsonSerialize(using = ToStringSerializer.class)
    private Long formulaId;

    //公式内容
    private String formulaContent;
    // 用于前端展示 公式原始内容
    private String originFormulaContent;
    // 用于前端展示 原始sql
    private String originSqlContent;



    //个税申报表对应字段
    private String taxDeclarationColumn;

    //排序字段
    private Integer sortedIndex;

    //是否可以编辑
    private boolean canEdit;

    //是否可以删除
    private boolean canDelete;

    //该分类是否隐藏（0不隐藏，1隐藏）
    @JsonSerialize(using = ToStringSerializer.class)
    private Long itemHide;

    /**
     * 进位规则
     */
    private Integer roundingMode;

    /**
     * 保留小数位数
     */
    private Integer pattern;

    // 显示宽度
    private Integer width;

    // 默认值
    private String defaultValue;
}
